﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using Visifire.Gauges;

namespace CPPEI.Coolzon.UI.DataPartLib
{
    public partial class DataGaugeDoubleCircularScale
    {
        public CircularScale SetCircular2Scale(CircularScale circular2Scale)
        {
            circular2Scale.Name = SECONDARYSCALE;
            circular2Scale.BorderBrush = Circular2BorderBrush==null? null : Circular2BorderBrush.Brush;
            circular2Scale.BorderThickness = Circular2BorderThickness;
            circular2Scale.Background = Circular2Background==null? null : Circular2Background.Brush;
            circular2Scale.Interval = Circular2Interval ?? Double.NaN;
            circular2Scale.Logarithmic = Circular2Logarithmic;
            circular2Scale.LogarithmBase = Circular2LogarithmBase;
            circular2Scale.Maximum = Circular2Maximum;
            circular2Scale.Minimum = Circular2Minimum;
            circular2Scale.Prefix = Circular2Prefix;
            circular2Scale.Radius = Circular2Radius;
            circular2Scale.ScalingSet = Circular2ScalingSet;
            circular2Scale.ShadowEnabled = Circular2ShadowEnabled;
            circular2Scale.StartAngle = Circular2StartAngle;
            circular2Scale.Suffix = Circular2Suffix;
            circular2Scale.SweepAngle = Circular2SweepAngle;
            circular2Scale.ToolTipText = Circular2ToolTipText;
            if (Circular2ScaleThickness != null && Circular2ScaleThickness >= 0 && Circular2ScaleThickness <= 1)
            {
                circular2Scale.ScaleThickness = Circular2ScaleThickness;
            }
            else
            {
                circular2Scale.ScaleThickness = null;
            }
            if (Circular2CenterX != null && Circular2CenterY != null && Circular2CenterX.Value >= 0 && Circular2CenterX.Value <= 1 && Circular2CenterY.Value >= 0 && Circular2CenterY.Value <= 1)
                circular2Scale.Center = new Point(Circular2CenterX.Value, Circular2CenterY.Value);
            else
                circular2Scale.Center = null;

            return circular2Scale;
        }
        private BrushEx circular2BorderBrush;
        private Thickness circular2BorderThickness;
        private BrushEx circular2Background;
        private double? circular2Interval;
        private bool circular2Logarithmic;
        private int circular2LogarithmBase;
        private double? circular2Maximum;
        private double? circular2Minimum;
        private string circular2Prefix;
        private double? circular2Radius;
        private string circular2ScalingSet;
        private bool circular2ShadowEnabled;
        private double? circular2StartAngle;
        private string circular2Suffix;
        private double? circular2SweepAngle;
        private string circular2ToolTipText;

        private double? circular2ScaleThickness;
        private double? circular2CenterX;
        private double? circular2CenterY;

        [Category("第二表盘标尺")]
        [DisplayName("第二表盘标尺边框颜色")]
        [Description("circular2BorderBrush")]
        [Editor(typeof(UI.XProperty.Editors.XBrushEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "circular2BorderBrush", "标尺边框颜色")]
        public BrushEx Circular2BorderBrush
        {
            get
            {
                return circular2BorderBrush;
            }

            set
            {
                circular2BorderBrush = value;
                Refresh();
            }
        }

        [Category("第二表盘标尺")]
        [DisplayName("第二表盘标尺边框大小")]
        [Description("circular2BorderThickness")]
        [Editor(typeof(UI.XProperty.Editors.XThicknessEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "circular2BorderThickness", "标尺边框大小")]
        public Thickness Circular2BorderThickness
        {
            get
            {
                return circular2BorderThickness;
            }

            set
            {
                circular2BorderThickness = value;
                Refresh();
            }
        }

        [Category("第二表盘标尺")]
        [DisplayName("第二表盘标尺背景颜色")]
        [Description("circular2Background")]
        [Editor(typeof(UI.XProperty.Editors.XBrushEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "circular2Background", "标尺背景颜色")]
        public BrushEx Circular2Background
        {
            get
            {
                return circular2Background;
            }

            set
            {
                circular2Background = value;
                Refresh();
            }
        }

        [Category("第二表盘标尺")]
        [DisplayName("第二表盘标尺步长")]
        [Description("circular2Interval")]
        [Editor(typeof(UI.XProperty.Editors.XDoubleNullEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "circular2Interval", "标尺步长")]
        public double? Circular2Interval
        {
            get
            {
                return circular2Interval;
            }

            set
            {
                circular2Interval = value;
                Refresh();
            }
        }

        [Category("第二表盘标尺")]
        [DisplayName("第二表盘标尺是否对数显示")]
        [Description("circular2Logarithmic")]
        [Editor(typeof(UI.XProperty.Editors.XBooleanEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "circular2Logarithmic", "标尺是否对数显示")]
        public bool Circular2Logarithmic
        {
            get
            {
                return circular2Logarithmic;
            }

            set
            {
                circular2Logarithmic = value;
                Refresh();
            }
        }

        [Category("第二表盘标尺")]
        [DisplayName("第二表盘标尺对数显示基数")]
        [Description("circular2LogarithmBase")]
        [Editor(typeof(UI.XProperty.Editors.XIntEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "circular2LogarithmBase", "标尺对数显示基数")]
        public int Circular2LogarithmBase
        {
            get
            {
                return circular2LogarithmBase;
            }

            set
            {
                circular2LogarithmBase = value;
                Refresh();
            }
        }

        [Category("第二表盘标尺")]
        [DisplayName("第二表盘标尺最大值")]
        [Description("circular2Maximum")]
        [Editor(typeof(UI.XProperty.Editors.XDoubleNullEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "circular2Maximum", "标尺最大值")]
        public double? Circular2Maximum
        {
            get
            {
                return circular2Maximum;
            }

            set
            {
                circular2Maximum = value;
                Refresh();
            }
        }

        [Category("第二表盘标尺")]
        [DisplayName("第二表盘标尺最小值")]
        [Description("circular2Minimum")]
        [Editor(typeof(UI.XProperty.Editors.XDoubleNullEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "circular2Minimum", "标尺最小值")]
        public double? Circular2Minimum
        {
            get
            {
                return circular2Minimum;
            }

            set
            {
                circular2Minimum = value;
                Refresh();
            }
        }

        [Category("第二表盘标尺")]
        [DisplayName("第二表盘标尺前缀")]
        [Description("circular2Prefix")]
        [Editor(typeof(UI.XProperty.Editors.XStringEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "circular2Prefix", "标尺前缀")]
        public string Circular2Prefix
        {
            get
            {
                return circular2Prefix;
            }

            set
            {
                circular2Prefix = value;
                Refresh();
            }
        }

        [Category("第二表盘标尺")]
        [DisplayName("第二表盘标尺半径")]
        [Description("circular2Radius")]
        [Editor(typeof(UI.XProperty.Editors.XDoubleNullEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "circular2Radius", "标尺半径")]
        public double? Circular2Radius
        {
            get
            {
                return circular2Radius;
            }

            set
            {
                circular2Radius = value;
                Refresh();
            }
        }

        [Category("第二表盘标尺")]
        [DisplayName("第二表盘标尺缩放")]
        [Description("circular2ScalingSet")]
        [Editor(typeof(UI.XProperty.Editors.XStringEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "circular2ScalingSet", "标尺缩放")]
        public string Circular2ScalingSet
        {
            get
            {
                return circular2ScalingSet;
            }

            set
            {
                circular2ScalingSet = value;
                Refresh();
            }
        }

        [Category("第二表盘标尺")]
        [DisplayName("第二表盘标尺是否显示阴影")]
        [Description("circular2ShadowEnabled")]
        [Editor(typeof(UI.XProperty.Editors.XBooleanEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "circular2ShadowEnabled", "标尺是否显示阴影")]
        public bool Circular2ShadowEnabled
        {
            get
            {
                return circular2ShadowEnabled;
            }

            set
            {
                circular2ShadowEnabled = value;
                Refresh();
            }
        }

        [Category("第二表盘标尺")]
        [DisplayName("第二表盘标尺起始角度")]
        [Description("circular2StartAngle")]
        [Editor(typeof(UI.XProperty.Editors.XDoubleNullEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "circular2StartAngle", "标尺起始角度")]
        public double? Circular2StartAngle
        {
            get
            {
                return circular2StartAngle;
            }

            set
            {
                circular2StartAngle = value;
                Refresh();
            }
        }

        [Category("第二表盘标尺")]
        [DisplayName("第二表盘标尺后缀")]
        [Description("circular2Suffix")]
        [Editor(typeof(UI.XProperty.Editors.XStringEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "circular2Suffix", "标尺后缀")]
        public string Circular2Suffix
        {
            get
            {
                return circular2Suffix;
            }

            set
            {
                circular2Suffix = value;
                Refresh();
            }
        }

        [Category("第二表盘标尺")]
        [DisplayName("第二表盘标尺范围角度")]
        [Description("circular2SweepAngle")]
        [Editor(typeof(UI.XProperty.Editors.XDoubleNullEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "circular2SweepAngle", "标尺范围角度")]
        public double? Circular2SweepAngle
        {
            get
            {
                return circular2SweepAngle;
            }

            set
            {
                circular2SweepAngle = value;
                Refresh();
            }
        }

        [Category("第二表盘标尺")]
        [DisplayName("第二表盘标尺提示")]
        [Description("circular2ToolTipText")]
        [Editor(typeof(UI.XProperty.Editors.XStringEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "circular2ToolTipText", "标尺提示")]
        public string Circular2ToolTipText
        {
            get
            {
                return circular2ToolTipText;
            }

            set
            {
                circular2ToolTipText = value;
                Refresh();
            }
        }

        [Category("第二表盘标尺")]
        [DisplayName("第二表盘标尺宽度(0-1)")]
        [Description("circular2ScaleThickness")]
        [Editor(typeof(UI.XProperty.Editors.XDoubleNullEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "circular2ScaleThickness", "标尺宽度(0-1)")]
        public double? Circular2ScaleThickness
        {
            get
            {
                return circular2ScaleThickness;
            }

            set
            {
                circular2ScaleThickness = value;
                Refresh();
            }
        }

        [Category("第二表盘标尺")]
        [DisplayName("第二表盘标尺圆心X(0-1)")]
        [Description("circular2Center")]
        [Editor(typeof(UI.XProperty.Editors.XDoubleNullEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "circular2Center", "标尺圆心X(0-1)")]
        public double? Circular2CenterX
        {
            get
            {
                return circular2CenterX;
            }

            set
            {
                circular2CenterX = value;
                Refresh();
            }
        }
        [Category("第二表盘标尺")]
        [DisplayName("第二表盘标尺圆心Y(0-1)")]
        [Description("circular2CenterY")]
        [Editor(typeof(UI.XProperty.Editors.XDoubleNullEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "circular2CenterY", "标尺圆心Y(0-1)")]
        public double? Circular2CenterY
        {
            get
            {
                return circular2CenterY;
            }

            set
            {
                circular2CenterY = value;
                Refresh();
            }
        }
    }
}
